package com.springcloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Created by it001 on 2018-07-26.
 */
@RestController
public class HelloControler {
    private static final Logger LOG = Logger.getLogger(HelloControler.class.getName());
    @Autowired
    HelloService helloService;

    @GetMapping(value = "/hi")
    public String hi(@RequestParam String name) {
        LOG.log(Level.INFO, "HelloControler hi");
        return helloService.hiService( name );
    }
}
